<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArSocket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArSocket.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArSocket-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArSocket Class Reference<div class="ingroups"><a class="el" href="group__UtilityClasses.html">Utility Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>socket communication wrapper  
 <a href="classArSocket.html#details">More...</a></p>

<p><code>#include &lt;ArSocket.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adb19935936354b6819a87d680d7a8b56"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb19935936354b6819a87d680d7a8b56"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Error</b> { <br />
&#160;&#160;<b>NoErr</b>, 
<b>NetFail</b>, 
<b>ConBadHost</b>, 
<b>ConNoRoute</b>, 
<br />
&#160;&#160;<b>ConRefused</b>, 
<b>NameLookup</b>
<br />
 }</td></tr>
<tr class="separator:adb19935936354b6819a87d680d7a8b56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09dbfe6cd3ec459a1cb105da8a267c06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09dbfe6cd3ec459a1cb105da8a267c06"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Type</b> { <b>UDP</b>, 
<b>TCP</b>, 
<b>Unknown</b>
 }</td></tr>
<tr class="separator:a09dbfe6cd3ec459a1cb105da8a267c06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6647efb8d20f9523dad090a68b1e4e2c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a6647efb8d20f9523dad090a68b1e4e2c">accept</a> (<a class="el" href="classArSocket.html">ArSocket</a> *sock)</td></tr>
<tr class="memdesc:a6647efb8d20f9523dad090a68b1e4e2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept a new connection.  <a href="#a6647efb8d20f9523dad090a68b1e4e2c">More...</a><br /></td></tr>
<tr class="separator:a6647efb8d20f9523dad090a68b1e4e2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e63b642e8fa16034373b51ef1c35705"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e63b642e8fa16034373b51ef1c35705"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a6e63b642e8fa16034373b51ef1c35705">ArSocket</a> ()</td></tr>
<tr class="memdesc:a6e63b642e8fa16034373b51ef1c35705"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. You must then use either <a class="el" href="classArSocket.html#ae9d803dcf9ad0bb72b790d3098ca8dc5" title="Connect as a client to a server. ">connect()</a> or <a class="el" href="classArSocket.html#a7a9bd59b92bd1018c8be0af39eac2dc8" title="Open a server port. ">open()</a>. <br /></td></tr>
<tr class="separator:a6e63b642e8fa16034373b51ef1c35705"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a612acf14e9aca4e12e931784a5147513"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a612acf14e9aca4e12e931784a5147513">ArSocket</a> (const char *host, int port, Type type)</td></tr>
<tr class="memdesc:a612acf14e9aca4e12e931784a5147513"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor which immediately connects to a server as a client <em>host</em> Hostname or IP address of remote server <em>port</em> Port number on server <em>Which</em> IP protocol to use, type ArSocket::TCP or ArSocket::UDP.  <a href="#a612acf14e9aca4e12e931784a5147513">More...</a><br /></td></tr>
<tr class="separator:a612acf14e9aca4e12e931784a5147513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a133fce4174f7a64327353510804796e9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a133fce4174f7a64327353510804796e9">ArSocket</a> (int port, bool doClose, Type type)</td></tr>
<tr class="memdesc:a133fce4174f7a64327353510804796e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor which immediately opens a port as a server <em>port</em> Port number to open.  <a href="#a133fce4174f7a64327353510804796e9">More...</a><br /></td></tr>
<tr class="separator:a133fce4174f7a64327353510804796e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77095a410aa628bdb678551ffb7a8dc9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77095a410aa628bdb678551ffb7a8dc9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a77095a410aa628bdb678551ffb7a8dc9">clearPartialReadString</a> (void)</td></tr>
<tr class="memdesc:a77095a410aa628bdb678551ffb7a8dc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the partial string read. <br /></td></tr>
<tr class="separator:a77095a410aa628bdb678551ffb7a8dc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89ab9a4e404526343ccf6ba3b6644c58"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a89ab9a4e404526343ccf6ba3b6644c58">close</a> ()</td></tr>
<tr class="memdesc:a89ab9a4e404526343ccf6ba3b6644c58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the socket.  <a href="#a89ab9a4e404526343ccf6ba3b6644c58">More...</a><br /></td></tr>
<tr class="separator:a89ab9a4e404526343ccf6ba3b6644c58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a678068d415d94ac8cb24af819b928786"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a678068d415d94ac8cb24af819b928786"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a678068d415d94ac8cb24af819b928786">comparePartialReadString</a> (const char *partialString)</td></tr>
<tr class="memdesc:a678068d415d94ac8cb24af819b928786"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares a string against what was partially read. <br /></td></tr>
<tr class="separator:a678068d415d94ac8cb24af819b928786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9d803dcf9ad0bb72b790d3098ca8dc5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ae9d803dcf9ad0bb72b790d3098ca8dc5">connect</a> (const char *host, int port, Type type=TCP, const char *openOnIP=NULL)</td></tr>
<tr class="memdesc:ae9d803dcf9ad0bb72b790d3098ca8dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect as a client to a server.  <a href="#ae9d803dcf9ad0bb72b790d3098ca8dc5">More...</a><br /></td></tr>
<tr class="separator:ae9d803dcf9ad0bb72b790d3098ca8dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7264b5996106c967abad8260e416d4d1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a7264b5996106c967abad8260e416d4d1">connectTo</a> (const char *host, int port)</td></tr>
<tr class="memdesc:a7264b5996106c967abad8260e416d4d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect the socket to the given address.  <a href="#a7264b5996106c967abad8260e416d4d1">More...</a><br /></td></tr>
<tr class="separator:a7264b5996106c967abad8260e416d4d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53c91a81c037e89f8c451ed265664ae9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a53c91a81c037e89f8c451ed265664ae9">connectTo</a> (struct sockaddr_in *sin)</td></tr>
<tr class="memdesc:a53c91a81c037e89f8c451ed265664ae9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect the socket to the given address.  <a href="#a53c91a81c037e89f8c451ed265664ae9">More...</a><br /></td></tr>
<tr class="separator:a53c91a81c037e89f8c451ed265664ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a933a1ca8492112def78ce9129023fc33"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a933a1ca8492112def78ce9129023fc33">copy</a> (int fd, bool doclose)</td></tr>
<tr class="memdesc:a933a1ca8492112def78ce9129023fc33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy internal socket structures.  <a href="#a933a1ca8492112def78ce9129023fc33">More...</a><br /></td></tr>
<tr class="separator:a933a1ca8492112def78ce9129023fc33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ecc5803161bcb8064355370f229bfd6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ecc5803161bcb8064355370f229bfd6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a0ecc5803161bcb8064355370f229bfd6">copy</a> (<a class="el" href="classArSocket.html">ArSocket</a> *s)</td></tr>
<tr class="memdesc:a0ecc5803161bcb8064355370f229bfd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy socket. <br /></td></tr>
<tr class="separator:a0ecc5803161bcb8064355370f229bfd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65d4a673234731800cb0f0fd399f2e2a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a65d4a673234731800cb0f0fd399f2e2a">create</a> (Type type)</td></tr>
<tr class="memdesc:a65d4a673234731800cb0f0fd399f2e2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simply create a port.  <a href="#a65d4a673234731800cb0f0fd399f2e2a">More...</a><br /></td></tr>
<tr class="separator:a65d4a673234731800cb0f0fd399f2e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a275484e4c9c98f05e61d7427ac3dcac6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a275484e4c9c98f05e61d7427ac3dcac6">findValidPort</a> (int startPort, const char *openOnIP=NULL)</td></tr>
<tr class="memdesc:a275484e4c9c98f05e61d7427ac3dcac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the first valid unused port after <em>startPort</em>, and bind the socket to it.  <a href="#a275484e4c9c98f05e61d7427ac3dcac6">More...</a><br /></td></tr>
<tr class="separator:a275484e4c9c98f05e61d7427ac3dcac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace2cdae7d0f720bf806c5c8fd80b6283"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace2cdae7d0f720bf806c5c8fd80b6283"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ace2cdae7d0f720bf806c5c8fd80b6283">getBadRead</a> (void) const </td></tr>
<tr class="memdesc:ace2cdae7d0f720bf806c5c8fd80b6283"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets if we've had a bad read (you have to use error tracking for this) <br /></td></tr>
<tr class="separator:ace2cdae7d0f720bf806c5c8fd80b6283"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0f6a5a791d9cc67672e72f466a20733"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0f6a5a791d9cc67672e72f466a20733"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ae0f6a5a791d9cc67672e72f466a20733">getBadWrite</a> (void) const </td></tr>
<tr class="memdesc:ae0f6a5a791d9cc67672e72f466a20733"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets if we've had a bad write (you have to use error tracking for this) <br /></td></tr>
<tr class="separator:ae0f6a5a791d9cc67672e72f466a20733"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adacaadc3f0a9368f74d28653a51aa64b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adacaadc3f0a9368f74d28653a51aa64b"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#adacaadc3f0a9368f74d28653a51aa64b">getBytesRecvd</a> (void)</td></tr>
<tr class="memdesc:adacaadc3f0a9368f74d28653a51aa64b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of bytes we've read. <br /></td></tr>
<tr class="separator:adacaadc3f0a9368f74d28653a51aa64b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4caa942c5a621f7ae7d6f4e4e791734"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4caa942c5a621f7ae7d6f4e4e791734"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ad4caa942c5a621f7ae7d6f4e4e791734">getBytesSent</a> (void)</td></tr>
<tr class="memdesc:ad4caa942c5a621f7ae7d6f4e4e791734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of bytes we've written. <br /></td></tr>
<tr class="separator:ad4caa942c5a621f7ae7d6f4e4e791734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6981526f9b4deeea5358d62915cdeb6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6981526f9b4deeea5358d62915cdeb6"></a>
<a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ad6981526f9b4deeea5358d62915cdeb6">getCloseCallback</a> (void)</td></tr>
<tr class="memdesc:ad6981526f9b4deeea5358d62915cdeb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback for when the socket is closed (nicely or harshly) <br /></td></tr>
<tr class="separator:ad6981526f9b4deeea5358d62915cdeb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a648c510820eda49619a22248915b084b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a648c510820eda49619a22248915b084b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a648c510820eda49619a22248915b084b">getEcho</a> (void)</td></tr>
<tr class="memdesc:a648c510820eda49619a22248915b084b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets if we are echoing on the readString calls this socket does. <br /></td></tr>
<tr class="separator:a648c510820eda49619a22248915b084b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7fa3b38b159dfca7b2fe9a49cb78fde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa7fa3b38b159dfca7b2fe9a49cb78fde"></a>
Error&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aa7fa3b38b159dfca7b2fe9a49cb78fde">getError</a> () const </td></tr>
<tr class="memdesc:aa7fa3b38b159dfca7b2fe9a49cb78fde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a code representing the last error. <br /></td></tr>
<tr class="separator:aa7fa3b38b159dfca7b2fe9a49cb78fde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a940299aab2087e9247dece7b7fe01a5c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a940299aab2087e9247dece7b7fe01a5c"></a>
const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a940299aab2087e9247dece7b7fe01a5c">getErrorStr</a> () const </td></tr>
<tr class="memdesc:a940299aab2087e9247dece7b7fe01a5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a string containing a description of the last error. Only valid if <a class="el" href="classArSocket.html#aa7fa3b38b159dfca7b2fe9a49cb78fde" title="Get a code representing the last error. ">getError()</a> does not return NoErr. <br /></td></tr>
<tr class="separator:a940299aab2087e9247dece7b7fe01a5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89aeefed86ac695e62480ec8e301f7dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89aeefed86ac695e62480ec8e301f7dd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a89aeefed86ac695e62480ec8e301f7dd">getErrorTracking</a> (void)</td></tr>
<tr class="memdesc:a89aeefed86ac695e62480ec8e301f7dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we're doing error tracking or not. <br /></td></tr>
<tr class="separator:a89aeefed86ac695e62480ec8e301f7dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f083363003397e042900e745da00a56"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f083363003397e042900e745da00a56"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a6f083363003397e042900e745da00a56">getFD</a> () const </td></tr>
<tr class="memdesc:a6f083363003397e042900e745da00a56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the file descriptor. <br /></td></tr>
<tr class="separator:a6f083363003397e042900e745da00a56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa6688b1776c58956b5d77e5b4933ebf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa6688b1776c58956b5d77e5b4933ebf"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aaa6688b1776c58956b5d77e5b4933ebf">getIPString</a> (void) const </td></tr>
<tr class="memdesc:aaa6688b1776c58956b5d77e5b4933ebf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the ip number as a string (this can be modified though) <br /></td></tr>
<tr class="separator:aaa6688b1776c58956b5d77e5b4933ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a419d5c27368a73c3c2e794fdf198d280"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a419d5c27368a73c3c2e794fdf198d280"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a419d5c27368a73c3c2e794fdf198d280">getLastStringReadTime</a> (void)</td></tr>
<tr class="memdesc:a419d5c27368a73c3c2e794fdf198d280"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the time we last successfully read a string from the socket. <br /></td></tr>
<tr class="separator:a419d5c27368a73c3c2e794fdf198d280"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15522e90c684f87d35e82d206edb2615"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a15522e90c684f87d35e82d206edb2615"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a15522e90c684f87d35e82d206edb2615">getLogWriteStrings</a> (void)</td></tr>
<tr class="memdesc:a15522e90c684f87d35e82d206edb2615"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we log the writeStrings or not. <br /></td></tr>
<tr class="separator:a15522e90c684f87d35e82d206edb2615"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5522159a0fa067bb20ad5dfb271d4e87"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5522159a0fa067bb20ad5dfb271d4e87"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a5522159a0fa067bb20ad5dfb271d4e87">getRawIPString</a> (void) const </td></tr>
<tr class="memdesc:a5522159a0fa067bb20ad5dfb271d4e87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the raw ip number as a string. <br /></td></tr>
<tr class="separator:a5522159a0fa067bb20ad5dfb271d4e87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a450f731d0774186d6029425f36e2867e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a450f731d0774186d6029425f36e2867e"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a450f731d0774186d6029425f36e2867e">getRecvs</a> (void)</td></tr>
<tr class="memdesc:a450f731d0774186d6029425f36e2867e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of reads we've done. <br /></td></tr>
<tr class="separator:a450f731d0774186d6029425f36e2867e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bd089aedbebfd7492efabd66128b982"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bd089aedbebfd7492efabd66128b982"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a8bd089aedbebfd7492efabd66128b982">getSends</a> (void)</td></tr>
<tr class="memdesc:a8bd089aedbebfd7492efabd66128b982"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of writes we've done. <br /></td></tr>
<tr class="separator:a8bd089aedbebfd7492efabd66128b982"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8bf1dbbb2aaecf96d23a13e68f68032"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ae8bf1dbbb2aaecf96d23a13e68f68032">getSockName</a> ()</td></tr>
<tr class="memdesc:ae8bf1dbbb2aaecf96d23a13e68f68032"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get socket information (socket "name"). Aspects of this "name" are accessible with <a class="el" href="classArSocket.html#a927ee1fa6eace33c6338f2644a614513" title="Accessor for the sockaddr. ">sockAddrIn()</a>, <a class="el" href="classArSocket.html#a8145c15c517a8be617630b22b854c4f4" title="Accessor for the in_addr part of sockaddr. ">inAddr()</a>, <a class="el" href="classArSocket.html#a34005874b46b174cfff549bcd8f50958" title="Accessor for the port of the sockaddr. ">inPort()</a>  <a href="#ae8bf1dbbb2aaecf96d23a13e68f68032">More...</a><br /></td></tr>
<tr class="separator:ae8bf1dbbb2aaecf96d23a13e68f68032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fa3014f97e7f63a750f09233910dba9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fa3014f97e7f63a750f09233910dba9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a1fa3014f97e7f63a750f09233910dba9">getStringUseWrongEndChars</a> (void)</td></tr>
<tr class="memdesc:a1fa3014f97e7f63a750f09233910dba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we log the writeStrings or not. <br /></td></tr>
<tr class="separator:a1fa3014f97e7f63a750f09233910dba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad367e1ccbe8b88b1049f75d2d9c31973"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad367e1ccbe8b88b1049f75d2d9c31973"></a>
Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ad367e1ccbe8b88b1049f75d2d9c31973">getType</a> () const </td></tr>
<tr class="memdesc:ad367e1ccbe8b88b1049f75d2d9c31973"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the protocol type. <br /></td></tr>
<tr class="separator:ad367e1ccbe8b88b1049f75d2d9c31973"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8145c15c517a8be617630b22b854c4f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8145c15c517a8be617630b22b854c4f4"></a>
struct in_addr *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a8145c15c517a8be617630b22b854c4f4">inAddr</a> ()</td></tr>
<tr class="memdesc:a8145c15c517a8be617630b22b854c4f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the in_addr part of sockaddr. <br /></td></tr>
<tr class="separator:a8145c15c517a8be617630b22b854c4f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34005874b46b174cfff549bcd8f50958"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a34005874b46b174cfff549bcd8f50958"></a>
unsigned short int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a34005874b46b174cfff549bcd8f50958">inPort</a> ()</td></tr>
<tr class="memdesc:a34005874b46b174cfff549bcd8f50958"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the port of the sockaddr. <br /></td></tr>
<tr class="separator:a34005874b46b174cfff549bcd8f50958"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0ea5b772014e84038b11007c784aa80"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0ea5b772014e84038b11007c784aa80"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isOpen</b> ()</td></tr>
<tr class="separator:af0ea5b772014e84038b11007c784aa80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a9bd59b92bd1018c8be0af39eac2dc8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a7a9bd59b92bd1018c8be0af39eac2dc8">open</a> (int port, Type type, const char *openOnIP=NULL)</td></tr>
<tr class="memdesc:a7a9bd59b92bd1018c8be0af39eac2dc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a server port.  <a href="#a7a9bd59b92bd1018c8be0af39eac2dc8">More...</a><br /></td></tr>
<tr class="separator:a7a9bd59b92bd1018c8be0af39eac2dc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cf324be0075d3469a70d01d4740e23c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a6cf324be0075d3469a70d01d4740e23c">read</a> (void *buff, size_t len, unsigned int msWait=0)</td></tr>
<tr class="memdesc:a6cf324be0075d3469a70d01d4740e23c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read data from the socket.  <a href="#a6cf324be0075d3469a70d01d4740e23c">More...</a><br /></td></tr>
<tr class="separator:a6cf324be0075d3469a70d01d4740e23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a6449d5b385d44e26af4250eaf7658c"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a7a6449d5b385d44e26af4250eaf7658c">readString</a> (unsigned int msWait=0)</td></tr>
<tr class="memdesc:a7a6449d5b385d44e26af4250eaf7658c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a string from the socket.  <a href="#a7a6449d5b385d44e26af4250eaf7658c">More...</a><br /></td></tr>
<tr class="separator:a7a6449d5b385d44e26af4250eaf7658c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b1623bf035093715ab90af1677ce2f2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a5b1623bf035093715ab90af1677ce2f2">recvFrom</a> (void *msg, int len, sockaddr_in *sin)</td></tr>
<tr class="memdesc:a5b1623bf035093715ab90af1677ce2f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a message (short string) from the socket.  <a href="#a5b1623bf035093715ab90af1677ce2f2">More...</a><br /></td></tr>
<tr class="separator:a5b1623bf035093715ab90af1677ce2f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6623e8121740f86d339678bd374a64e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6623e8121740f86d339678bd374a64e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ae6623e8121740f86d339678bd374a64e">resetTracking</a> (void)</td></tr>
<tr class="memdesc:ae6623e8121740f86d339678bd374a64e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the tracking information on the socket. <br /></td></tr>
<tr class="separator:ae6623e8121740f86d339678bd374a64e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad4e9284aa39028d770a6fef0ebb62a3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aad4e9284aa39028d770a6fef0ebb62a3">sendTo</a> (const void *msg, int len)</td></tr>
<tr class="memdesc:aad4e9284aa39028d770a6fef0ebb62a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message (short string) on the socket.  <a href="#aad4e9284aa39028d770a6fef0ebb62a3">More...</a><br /></td></tr>
<tr class="separator:aad4e9284aa39028d770a6fef0ebb62a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aa35f485bbdbacfe599617366d761ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a7aa35f485bbdbacfe599617366d761ff">sendTo</a> (const void *msg, int len, struct sockaddr_in *sin)</td></tr>
<tr class="memdesc:a7aa35f485bbdbacfe599617366d761ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message (short string) on the socket.  <a href="#a7aa35f485bbdbacfe599617366d761ff">More...</a><br /></td></tr>
<tr class="separator:a7aa35f485bbdbacfe599617366d761ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a946caf0804f5d91682d816d0995c84c2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a946caf0804f5d91682d816d0995c84c2">setBroadcast</a> ()</td></tr>
<tr class="memdesc:a946caf0804f5d91682d816d0995c84c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set broadcast value.  <a href="#a946caf0804f5d91682d816d0995c84c2">More...</a><br /></td></tr>
<tr class="separator:a946caf0804f5d91682d816d0995c84c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d3639bbd69a3b15a0a2d1bb18926ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00d3639bbd69a3b15a0a2d1bb18926ae"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a00d3639bbd69a3b15a0a2d1bb18926ae">setCloseCallback</a> (<a class="el" href="classArFunctor.html">ArFunctor</a> *functor)</td></tr>
<tr class="memdesc:a00d3639bbd69a3b15a0a2d1bb18926ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback for when the socket is closed (nicely or harshly) <br /></td></tr>
<tr class="separator:a00d3639bbd69a3b15a0a2d1bb18926ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee8af0ae8cda0d42af53b0d947f63662"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee8af0ae8cda0d42af53b0d947f63662"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aee8af0ae8cda0d42af53b0d947f63662">setDoClose</a> (bool yesno)</td></tr>
<tr class="memdesc:aee8af0ae8cda0d42af53b0d947f63662"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the doClose value. <br /></td></tr>
<tr class="separator:aee8af0ae8cda0d42af53b0d947f63662"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88ff816474b10a1ff7d5e1e6f669ad0b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88ff816474b10a1ff7d5e1e6f669ad0b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a88ff816474b10a1ff7d5e1e6f669ad0b">setEcho</a> (bool echo)</td></tr>
<tr class="memdesc:a88ff816474b10a1ff7d5e1e6f669ad0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets echoing on the readString calls this socket does. <br /></td></tr>
<tr class="separator:a88ff816474b10a1ff7d5e1e6f669ad0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51f2ffe292d3e8aa8cf2dbc3616b4fdc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51f2ffe292d3e8aa8cf2dbc3616b4fdc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a51f2ffe292d3e8aa8cf2dbc3616b4fdc">setErrorTracking</a> (bool errorTracking)</td></tr>
<tr class="memdesc:a51f2ffe292d3e8aa8cf2dbc3616b4fdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we're error tracking or not. <br /></td></tr>
<tr class="separator:a51f2ffe292d3e8aa8cf2dbc3616b4fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a385de96a675c6e7ae58cc8e8a5fae99e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a385de96a675c6e7ae58cc8e8a5fae99e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a385de96a675c6e7ae58cc8e8a5fae99e">setFakeWrites</a> (bool fakeWrites)</td></tr>
<tr class="memdesc:a385de96a675c6e7ae58cc8e8a5fae99e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set if we're faking writes or not. <br /></td></tr>
<tr class="separator:a385de96a675c6e7ae58cc8e8a5fae99e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1ce133ca58c9f8277cdbce80aa04241"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae1ce133ca58c9f8277cdbce80aa04241"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ae1ce133ca58c9f8277cdbce80aa04241">setIPString</a> (const char *ipString)</td></tr>
<tr class="memdesc:ae1ce133ca58c9f8277cdbce80aa04241"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ip string. <br /></td></tr>
<tr class="separator:ae1ce133ca58c9f8277cdbce80aa04241"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee3f81f6d774f883b1ff46fe9d89d02f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aee3f81f6d774f883b1ff46fe9d89d02f">setLinger</a> (int time)</td></tr>
<tr class="memdesc:aee3f81f6d774f883b1ff46fe9d89d02f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the linger value.  <a href="#aee3f81f6d774f883b1ff46fe9d89d02f">More...</a><br /></td></tr>
<tr class="separator:aee3f81f6d774f883b1ff46fe9d89d02f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b44fe448b57e7730a049e62464760b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b44fe448b57e7730a049e62464760b5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a4b44fe448b57e7730a049e62464760b5">setLogWriteStrings</a> (bool logWriteStrings)</td></tr>
<tr class="memdesc:a4b44fe448b57e7730a049e62464760b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we log the writeStrings or not. <br /></td></tr>
<tr class="separator:a4b44fe448b57e7730a049e62464760b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c435287e6e2f778874dcc15c6aa4e27"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a5c435287e6e2f778874dcc15c6aa4e27">setNoDelay</a> (bool flag)</td></tr>
<tr class="memdesc:a5c435287e6e2f778874dcc15c6aa4e27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets NODELAY option on TCP socket, which can reduce latency for small packet sizes.  <a href="#a5c435287e6e2f778874dcc15c6aa4e27">More...</a><br /></td></tr>
<tr class="separator:a5c435287e6e2f778874dcc15c6aa4e27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a657700645f097c3b53c2f5bb8c97cb7e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a657700645f097c3b53c2f5bb8c97cb7e">setNonBlock</a> ()</td></tr>
<tr class="memdesc:a657700645f097c3b53c2f5bb8c97cb7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set socket to nonblocking. Most importantly, calls to <a class="el" href="classArSocket.html#a6cf324be0075d3469a70d01d4740e23c" title="Read data from the socket. ">read()</a> will return immediately, even if no data is available.  <a href="#a657700645f097c3b53c2f5bb8c97cb7e">More...</a><br /></td></tr>
<tr class="separator:a657700645f097c3b53c2f5bb8c97cb7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83885cf24c725497489d10cf68dcc264"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83885cf24c725497489d10cf68dcc264"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a83885cf24c725497489d10cf68dcc264">setReadStringIgnoreReturn</a> (bool ignore)</td></tr>
<tr class="memdesc:a83885cf24c725497489d10cf68dcc264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether to ignore carriage return characters in readString or not. <br /></td></tr>
<tr class="separator:a83885cf24c725497489d10cf68dcc264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87e6aaf36163f42cac218333ecc078b7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a87e6aaf36163f42cac218333ecc078b7">setReuseAddress</a> ()</td></tr>
<tr class="memdesc:a87e6aaf36163f42cac218333ecc078b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the reuse address value.  <a href="#a87e6aaf36163f42cac218333ecc078b7">More...</a><br /></td></tr>
<tr class="separator:a87e6aaf36163f42cac218333ecc078b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4a311d9c20b378cf65a2f8c0bb45158"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af4a311d9c20b378cf65a2f8c0bb45158"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#af4a311d9c20b378cf65a2f8c0bb45158">setStringUseWrongEndChars</a> (bool useWrongEndChars)</td></tr>
<tr class="memdesc:af4a311d9c20b378cf65a2f8c0bb45158"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we use the wrong (legacy) end chars or not. <br /></td></tr>
<tr class="separator:af4a311d9c20b378cf65a2f8c0bb45158"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a927ee1fa6eace33c6338f2644a614513"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a927ee1fa6eace33c6338f2644a614513"></a>
struct sockaddr_in *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a927ee1fa6eace33c6338f2644a614513">sockAddrIn</a> ()</td></tr>
<tr class="memdesc:a927ee1fa6eace33c6338f2644a614513"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor for the sockaddr. <br /></td></tr>
<tr class="separator:a927ee1fa6eace33c6338f2644a614513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa92f0db004d5642efb4298e4fcad2738"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aa92f0db004d5642efb4298e4fcad2738">transfer</a> (<a class="el" href="classArSocket.html">ArSocket</a> *s)</td></tr>
<tr class="memdesc:aa92f0db004d5642efb4298e4fcad2738"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transfer ownership of a socket.  <a href="#aa92f0db004d5642efb4298e4fcad2738">More...</a><br /></td></tr>
<tr class="separator:aa92f0db004d5642efb4298e4fcad2738"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2cfbd564eec7020283f5a6fe41f558f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#af2cfbd564eec7020283f5a6fe41f558f">write</a> (const void *buff, size_t len)</td></tr>
<tr class="memdesc:af2cfbd564eec7020283f5a6fe41f558f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write data to the socket.  <a href="#af2cfbd564eec7020283f5a6fe41f558f">More...</a><br /></td></tr>
<tr class="separator:af2cfbd564eec7020283f5a6fe41f558f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62c1a96eb8fa0dd1c384646228eac194"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a62c1a96eb8fa0dd1c384646228eac194">writeString</a> (const char *str,...)</td></tr>
<tr class="memdesc:a62c1a96eb8fa0dd1c384646228eac194"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a string to the socket (adding end of line characters)  <a href="#a62c1a96eb8fa0dd1c384646228eac194">More...</a><br /></td></tr>
<tr class="separator:a62c1a96eb8fa0dd1c384646228eac194"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69ca55d1e3007e2743c53b038bbe62a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69ca55d1e3007e2743c53b038bbe62a7"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a69ca55d1e3007e2743c53b038bbe62a7">writeStringPlain</a> (const char *str)</td></tr>
<tr class="memdesc:a69ca55d1e3007e2743c53b038bbe62a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <a class="el" href="classArSocket.html#a62c1a96eb8fa0dd1c384646228eac194" title="Writes a string to the socket (adding end of line characters) ">writeString()</a>, but no varargs. <br /></td></tr>
<tr class="separator:a69ca55d1e3007e2743c53b038bbe62a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a646555713d800087963735c3aa55b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a646555713d800087963735c3aa55b5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a9a646555713d800087963735c3aa55b5">~ArSocket</a> ()</td></tr>
<tr class="memdesc:a9a646555713d800087963735c3aa55b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a9a646555713d800087963735c3aa55b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a666b81136fa241062dfdc4aff63913f3"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a666b81136fa241062dfdc4aff63913f3">addrHost</a> (struct in_addr &amp;addr, char *host)</td></tr>
<tr class="memdesc:a666b81136fa241062dfdc4aff63913f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an address structure to a hostname string.  <a href="#a666b81136fa241062dfdc4aff63913f3">More...</a><br /></td></tr>
<tr class="separator:a666b81136fa241062dfdc4aff63913f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2bfb5761883c6306a3c22b90180ad36"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2bfb5761883c6306a3c22b90180ad36"></a>
static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ac2bfb5761883c6306a3c22b90180ad36">getHostName</a> ()</td></tr>
<tr class="memdesc:ac2bfb5761883c6306a3c22b90180ad36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the localhost address. <br /></td></tr>
<tr class="separator:ac2bfb5761883c6306a3c22b90180ad36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa11d9c51e510e4b7bfc35103bc3b4114"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aa11d9c51e510e4b7bfc35103bc3b4114">hostAddr</a> (const char *host, struct in_addr &amp;addr)</td></tr>
<tr class="memdesc:aa11d9c51e510e4b7bfc35103bc3b4114"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a hostname string to an address structure.  <a href="#aa11d9c51e510e4b7bfc35103bc3b4114">More...</a><br /></td></tr>
<tr class="separator:aa11d9c51e510e4b7bfc35103bc3b4114"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af081e418282cd9d9cc72672808b9ce9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af081e418282cd9d9cc72672808b9ce9d"></a>
static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#af081e418282cd9d9cc72672808b9ce9d">hostToNetOrder</a> (int i)</td></tr>
<tr class="memdesc:af081e418282cd9d9cc72672808b9ce9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an int from host byte order to network byte order. <br /></td></tr>
<tr class="separator:af081e418282cd9d9cc72672808b9ce9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11b42725ca91a9d95cbe85f56feba58e"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e">init</a> ()</td></tr>
<tr class="memdesc:a11b42725ca91a9d95cbe85f56feba58e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the OS sockets system, if neccesary.  <a href="#a11b42725ca91a9d95cbe85f56feba58e">More...</a><br /></td></tr>
<tr class="separator:a11b42725ca91a9d95cbe85f56feba58e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab26ab367da522f4e388cbba5e55438bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab26ab367da522f4e388cbba5e55438bb"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ab26ab367da522f4e388cbba5e55438bb">inToA</a> (struct in_addr *addr, char *buff)</td></tr>
<tr class="memdesc:ab26ab367da522f4e388cbba5e55438bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert <em>addr</em> into string numerical address. <br /></td></tr>
<tr class="separator:ab26ab367da522f4e388cbba5e55438bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4c5eb5dc6183eb692867399acc1d024"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4c5eb5dc6183eb692867399acc1d024"></a>
static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#ad4c5eb5dc6183eb692867399acc1d024">maxHostNameLen</a> ()</td></tr>
<tr class="memdesc:ad4c5eb5dc6183eb692867399acc1d024"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max host name length. <br /></td></tr>
<tr class="separator:ad4c5eb5dc6183eb692867399acc1d024"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd267582a359ab24bdfd04ef12f211c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd267582a359ab24bdfd04ef12f211c9"></a>
static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#afd267582a359ab24bdfd04ef12f211c9">netToHostOrder</a> (int i)</td></tr>
<tr class="memdesc:afd267582a359ab24bdfd04ef12f211c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an int from network byte order to host byte order. <br /></td></tr>
<tr class="separator:afd267582a359ab24bdfd04ef12f211c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec8534984137fb13a4f1e94c2b3839dc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc">shutdown</a> ()</td></tr>
<tr class="memdesc:aec8534984137fb13a4f1e94c2b3839dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown the OS sockets system, if neccesary.  <a href="#aec8534984137fb13a4f1e94c2b3839dc">More...</a><br /></td></tr>
<tr class="separator:aec8534984137fb13a4f1e94c2b3839dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac70285e1c71e39c730354779aad930f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac70285e1c71e39c730354779aad930f"></a>
static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aac70285e1c71e39c730354779aad930f">sockAddrLen</a> ()</td></tr>
<tr class="memdesc:aac70285e1c71e39c730354779aad930f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the sockaddr. <br /></td></tr>
<tr class="separator:aac70285e1c71e39c730354779aad930f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dabc6bfbee605d1c4ed786251c2487e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3dabc6bfbee605d1c4ed786251c2487e"></a>
static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a3dabc6bfbee605d1c4ed786251c2487e">toString</a> (Type t)</td></tr>
<tr class="memdesc:a3dabc6bfbee605d1c4ed786251c2487e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the given socket type to a displayable text string (for debugging). <br /></td></tr>
<tr class="separator:a3dabc6bfbee605d1c4ed786251c2487e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:aca573cdd6accf8b1a4597144d11caf7a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca573cdd6accf8b1a4597144d11caf7a"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#aca573cdd6accf8b1a4597144d11caf7a">ourInitialized</a> =true</td></tr>
<tr class="memdesc:aca573cdd6accf8b1a4597144d11caf7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">We're always initialized in Linux. <br /></td></tr>
<tr class="separator:aca573cdd6accf8b1a4597144d11caf7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a02c8cf76da42735513ed16f337d7995c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02c8cf76da42735513ed16f337d7995c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a02c8cf76da42735513ed16f337d7995c">doStringEcho</a> (void)</td></tr>
<tr class="memdesc:a02c8cf76da42735513ed16f337d7995c"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal function that echos strings from read string <br /></td></tr>
<tr class="separator:a02c8cf76da42735513ed16f337d7995c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14db81375c1a585fd01c5bf9c6aedf98"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14db81375c1a585fd01c5bf9c6aedf98"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>internalInit</b> (void)</td></tr>
<tr class="separator:a14db81375c1a585fd01c5bf9c6aedf98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae434e97f4a1fa1468f501ac1a107a960"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae434e97f4a1fa1468f501ac1a107a960"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>separateHost</b> (const char *rawHost, int rawPort, char *useHost, size_t useHostSize, int *port)</td></tr>
<tr class="separator:ae434e97f4a1fa1468f501ac1a107a960"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91f2b1736eefe5a0aa68664473a1bef5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91f2b1736eefe5a0aa68664473a1bef5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSocket.html#a91f2b1736eefe5a0aa68664473a1bef5">setRawIPString</a> (void)</td></tr>
<tr class="memdesc:a91f2b1736eefe5a0aa68664473a1bef5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ip string internal function that sets the ip string from the inAddr. <br /></td></tr>
<tr class="separator:a91f2b1736eefe5a0aa68664473a1bef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:afcce4cd18c1628db9e325eac3db91dc9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afcce4cd18c1628db9e325eac3db91dc9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myBadRead</b></td></tr>
<tr class="separator:afcce4cd18c1628db9e325eac3db91dc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57d3ceba19d8be1693261ca56bb4ad17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a57d3ceba19d8be1693261ca56bb4ad17"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myBadWrite</b></td></tr>
<tr class="separator:a57d3ceba19d8be1693261ca56bb4ad17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6a040b43588c7516f9ffdfd0925b7e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a6a040b43588c7516f9ffdfd0925b7e"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>myBytesRecvd</b></td></tr>
<tr class="separator:a9a6a040b43588c7516f9ffdfd0925b7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade93541f345978b63ead59f2df03e0a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade93541f345978b63ead59f2df03e0a3"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>myBytesSent</b></td></tr>
<tr class="separator:ade93541f345978b63ead59f2df03e0a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27b9b67047464c5c63746da87aa1ab75"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27b9b67047464c5c63746da87aa1ab75"></a>
<a class="el" href="classArFunctor.html">ArFunctor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myCloseFunctor</b></td></tr>
<tr class="separator:a27b9b67047464c5c63746da87aa1ab75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ea6265ce63a8be89c0c5ec9aba5c775"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ea6265ce63a8be89c0c5ec9aba5c775"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myDoClose</b></td></tr>
<tr class="separator:a6ea6265ce63a8be89c0c5ec9aba5c775"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60119bd4625c2377b4102ccdf671f0e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60119bd4625c2377b4102ccdf671f0e5"></a>
Error&#160;</td><td class="memItemRight" valign="bottom"><b>myError</b></td></tr>
<tr class="separator:a60119bd4625c2377b4102ccdf671f0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa161e749683fae496989f793fb099641"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa161e749683fae496989f793fb099641"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myErrorStr</b></td></tr>
<tr class="separator:aa161e749683fae496989f793fb099641"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0f025762342dc33e85a96736d35ea8c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0f025762342dc33e85a96736d35ea8c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myErrorTracking</b></td></tr>
<tr class="separator:ac0f025762342dc33e85a96736d35ea8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab69c0a13fd0fbf23c5558e70bdc06320"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab69c0a13fd0fbf23c5558e70bdc06320"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myFakeWrites</b></td></tr>
<tr class="separator:ab69c0a13fd0fbf23c5558e70bdc06320"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f179465ed45ab4e6e31dd5b6009bfdc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f179465ed45ab4e6e31dd5b6009bfdc"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myFD</b></td></tr>
<tr class="separator:a1f179465ed45ab4e6e31dd5b6009bfdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a036a9a049ca89668c4f2131d829f9532"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a036a9a049ca89668c4f2131d829f9532"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myIPString</b></td></tr>
<tr class="separator:a036a9a049ca89668c4f2131d829f9532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa625f78aaacdc387b1d7fb896b66f891"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa625f78aaacdc387b1d7fb896b66f891"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myLastStringReadTime</b></td></tr>
<tr class="separator:aa625f78aaacdc387b1d7fb896b66f891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4369435b4b775c73154aeb9631b8cef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4369435b4b775c73154aeb9631b8cef"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myLogWriteStrings</b></td></tr>
<tr class="separator:ae4369435b4b775c73154aeb9631b8cef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b703361b7349afe18e186a16372f27d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b703361b7349afe18e186a16372f27d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myNonBlocking</b></td></tr>
<tr class="separator:a3b703361b7349afe18e186a16372f27d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23ff60dc6d70cea35cb060fc88fad2f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23ff60dc6d70cea35cb060fc88fad2f1"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>myRawIPString</b> [128]</td></tr>
<tr class="separator:a23ff60dc6d70cea35cb060fc88fad2f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a394365f59801d71402749de9fd55d2f3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a394365f59801d71402749de9fd55d2f3"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myReadStringMutex</b></td></tr>
<tr class="separator:a394365f59801d71402749de9fd55d2f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b4e91f59c064b1a279882e48ee31d9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2b4e91f59c064b1a279882e48ee31d9b"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>myRecvs</b></td></tr>
<tr class="separator:a2b4e91f59c064b1a279882e48ee31d9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a792de5f964cbf9cd2151bf574a5e0518"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a792de5f964cbf9cd2151bf574a5e0518"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>mySends</b></td></tr>
<tr class="separator:a792de5f964cbf9cd2151bf574a5e0518"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f97d94b49e2cca8727957f35b4f1b16"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f97d94b49e2cca8727957f35b4f1b16"></a>
struct sockaddr_in&#160;</td><td class="memItemRight" valign="bottom"><b>mySin</b></td></tr>
<tr class="separator:a2f97d94b49e2cca8727957f35b4f1b16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24447d6149c0ea04fde01eb6b187bbb9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24447d6149c0ea04fde01eb6b187bbb9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringAutoEcho</b></td></tr>
<tr class="separator:a24447d6149c0ea04fde01eb6b187bbb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3df5953b862720adca9014038c06d99b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3df5953b862720adca9014038c06d99b"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>myStringBuf</b> [5000]</td></tr>
<tr class="separator:a3df5953b862720adca9014038c06d99b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ca7a3f72c7dd547de73028724999dbd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ca7a3f72c7dd547de73028724999dbd"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>myStringBufEmpty</b> [1]</td></tr>
<tr class="separator:a6ca7a3f72c7dd547de73028724999dbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48a08ea0b08853114147a40184d1913f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48a08ea0b08853114147a40184d1913f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringEcho</b></td></tr>
<tr class="separator:a48a08ea0b08853114147a40184d1913f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac78b34332a16f9283d14eaf47fc3b838"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac78b34332a16f9283d14eaf47fc3b838"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringGotComplete</b></td></tr>
<tr class="separator:ac78b34332a16f9283d14eaf47fc3b838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14993c1a7f213fef06e805e33c110b8d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14993c1a7f213fef06e805e33c110b8d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringGotEscapeChars</b></td></tr>
<tr class="separator:a14993c1a7f213fef06e805e33c110b8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8ae61b1a07a8fa5968bc4803debc4f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8ae61b1a07a8fa5968bc4803debc4f8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringHaveEchoed</b></td></tr>
<tr class="separator:ae8ae61b1a07a8fa5968bc4803debc4f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dfff4427e00f1cca50bca6a241d6780"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dfff4427e00f1cca50bca6a241d6780"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringIgnoreReturn</b></td></tr>
<tr class="separator:a1dfff4427e00f1cca50bca6a241d6780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ecec1138e16619492cd0aff0b6f1fb4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ecec1138e16619492cd0aff0b6f1fb4"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>myStringPos</b></td></tr>
<tr class="separator:a1ecec1138e16619492cd0aff0b6f1fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf92a212f2fcbf853860409deb9d0cb0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf92a212f2fcbf853860409deb9d0cb0"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>myStringPosLast</b></td></tr>
<tr class="separator:abf92a212f2fcbf853860409deb9d0cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b76f280862e5eef9f581df3cac3d42d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b76f280862e5eef9f581df3cac3d42d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myStringWrongEndChars</b></td></tr>
<tr class="separator:a8b76f280862e5eef9f581df3cac3d42d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a929f2fe07643d38b3a7f53034629a862"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a929f2fe07643d38b3a7f53034629a862"></a>
Type&#160;</td><td class="memItemRight" valign="bottom"><b>myType</b></td></tr>
<tr class="separator:a929f2fe07643d38b3a7f53034629a862"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08647d6a474acb14498901b062a806d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08647d6a474acb14498901b062a806d3"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myWriteStringMutex</b></td></tr>
<tr class="separator:a08647d6a474acb14498901b062a806d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>socket communication wrapper </p>
<p><a class="el" href="classArSocket.html" title="socket communication wrapper ">ArSocket</a> is a layer which allows you to use the sockets networking interface in an operating system independent manner. All of the standard commonly used socket functions are implemented such as <a class="el" href="classArSocket.html#a7a9bd59b92bd1018c8be0af39eac2dc8" title="Open a server port. ">open()</a>, <a class="el" href="classArSocket.html#a89ab9a4e404526343ccf6ba3b6644c58" title="Close the socket. ">close()</a>, <a class="el" href="classArSocket.html#ae9d803dcf9ad0bb72b790d3098ca8dc5" title="Connect as a client to a server. ">connect()</a>, <a class="el" href="classArSocket.html#a6647efb8d20f9523dad090a68b1e4e2c" title="Accept a new connection. ">accept()</a>, <a class="el" href="classArSocket.html#a6cf324be0075d3469a70d01d4740e23c" title="Read data from the socket. ">read()</a>, <a class="el" href="classArSocket.html#af2cfbd564eec7020283f5a6fe41f558f" title="Write data to the socket. ">write()</a>, <a class="el" href="classArSocket.html#af081e418282cd9d9cc72672808b9ce9d" title="Convert an int from host byte order to network byte order. ">hostToNetOrder()</a>, <a class="el" href="classArSocket.html#afd267582a359ab24bdfd04ef12f211c9" title="Convert an int from network byte order to host byte order. ">netToHostOrder()</a>. <a class="el" href="classArSocket.html" title="socket communication wrapper ">ArSocket</a> extends some of these functions to set useful options (see method documentation for details). It also provides additional useful functions like <a class="el" href="classArSocket.html#a62c1a96eb8fa0dd1c384646228eac194" title="Writes a string to the socket (adding end of line characters) ">writeString()</a>, readString, <a class="el" href="classArSocket.html#a00d3639bbd69a3b15a0a2d1bb18926ae" title="Sets the callback for when the socket is closed (nicely or harshly) ">setCloseCallback()</a>, and more.</p>
<p>In Windows, the sockets subsystem needs to be initialized and shutdown by the program. So when a program starts it must call <a class="el" href="classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73" title="Initialize Aria global data struture and perform OS-specific initialization, including adding OS sign...">Aria::init()</a> and call <a class="el" href="classAria.html#a184602a2b3799d61569ec55dd9508450" title="Shutdown all Aria processes/threads. ">Aria::shutdown()</a> when it exits. (Or, to only initialize the socket system, and not do any other global <a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> initialization, use <a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e" title="Initialize the OS sockets system, if neccesary. ">ArSocket::init()</a> and <a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc" title="Shutdown the OS sockets system, if neccesary. ">ArSocket::shutdown()</a>.)</p>
<p>Some calls set an error code on failure in addition to returning false. This value is available from <a class="el" href="classArSocket.html#aa7fa3b38b159dfca7b2fe9a49cb78fde" title="Get a code representing the last error. ">getError()</a>. If <a class="el" href="classArSocket.html#aa7fa3b38b159dfca7b2fe9a49cb78fde" title="Get a code representing the last error. ">getError()</a> returns something other than NoErr, a text description of the error may be available from <a class="el" href="classArSocket.html#a940299aab2087e9247dece7b7fe01a5c" title="Get a string containing a description of the last error. Only valid if getError() does not return NoE...">getErrorStr()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="socketServerExample_8cpp-example.html">socketServerExample.cpp</a> </dd>
<dd>
<a class="el" href="socketClientExample_8cpp-example.html">socketClientExample.cpp</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="netServerExample_8cpp-example.html#_a0">netServerExample.cpp</a>, <a class="el" href="socketClientExample_8cpp-example.html#_a0">socketClientExample.cpp</a>, and <a class="el" href="socketServerExample_8cpp-example.html#_a1">socketServerExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a612acf14e9aca4e12e931784a5147513"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSocket::ArSocket </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Type&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor which immediately connects to a server as a client <em>host</em> Hostname or IP address of remote server <em>port</em> Port number on server <em>Which</em> IP protocol to use, type ArSocket::TCP or ArSocket::UDP. </p>
<p>Constructs the socket and connects it to the given host.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>hostname of the server to connect to </td></tr>
    <tr><td class="paramname">port</td><td>port number of the server to connect to </td></tr>
    <tr><td class="paramname">type</td><td>protocol type to use </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a133fce4174f7a64327353510804796e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSocket::ArSocket </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>doClose</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Type&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor which immediately opens a port as a server <em>port</em> Port number to open. </p>
<p>Use a value greater than 1024. <em>doClose</em> Automatically close the port when <a class="el" href="classArSocket.html" title="socket communication wrapper ">ArSocket</a> is destroyed (recommend using true) <em>type</em> Which IP protocol to use, ArSocket::TCP or ArSocket::UDP </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6647efb8d20f9523dad090a68b1e4e2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::accept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td>
          <td class="paramname"><em>sock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept a new connection. </p>
<dl class="section return"><dt>Returns</dt><dd>true if there are no errors, false if there are errors... not that if you're in non-blocking mode and there is no socket to connect that is NOT an error, you'll want to check the getFD on the sock you pass in to see if it is actually a valid socket.</dd>
<dd>
false and set error code and description string on failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketServerExample_8cpp-example.html#a8">socketServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a666b81136fa241062dfdc4aff63913f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::addrHost </td>
          <td>(</td>
          <td class="paramtype">struct in_addr &amp;&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>host</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert an address structure to a hostname string. </p>
<dl class="section return"><dt>Returns</dt><dd>false on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a89ab9a4e404526343ccf6ba3b6644c58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::close </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close the socket. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketClientExample_8cpp-example.html#a10">socketClientExample.cpp</a>, and <a class="el" href="socketServerExample_8cpp-example.html#a12">socketServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ae9d803dcf9ad0bb72b790d3098ca8dc5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::connect </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Type&#160;</td>
          <td class="paramname"><em>type</em> = <code>TCP</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>openOnIP</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect as a client to a server. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketClientExample_8cpp-example.html#a4">socketClientExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a7264b5996106c967abad8260e416d4d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::connectTo </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect the socket to the given address. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a53c91a81c037e89f8c451ed265664ae9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::connectTo </td>
          <td>(</td>
          <td class="paramtype">struct sockaddr_in *&#160;</td>
          <td class="paramname"><em>sin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect the socket to the given address. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a933a1ca8492112def78ce9129023fc33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::copy </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>doclose</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy internal socket structures. </p>
<p>Copy socket structures.</p>
<p>Copy from one Socket to another will still have the first socket close the file descripter when it is destructed. </p><dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure.</dd>
<dd>
false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a65d4a673234731800cb0f0fd399f2e2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::create </td>
          <td>(</td>
          <td class="paramtype">Type&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Simply create a port. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a275484e4c9c98f05e61d7427ac3dcac6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::findValidPort </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>startPort</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>openOnIP</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find the first valid unused port after <em>startPort</em>, and bind the socket to it. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">startPort</td><td>first port to try </td></tr>
    <tr><td class="paramname">openOnIP</td><td>If given, only check ports open on the interface accociated with this address (Linux only)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>false on error</dd>
<dd>
false on failure </dd></dl>

</div>
</div>
<a class="anchor" id="ae8bf1dbbb2aaecf96d23a13e68f68032"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::getSockName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get socket information (socket "name"). Aspects of this "name" are accessible with <a class="el" href="classArSocket.html#a927ee1fa6eace33c6338f2644a614513" title="Accessor for the sockaddr. ">sockAddrIn()</a>, <a class="el" href="classArSocket.html#a8145c15c517a8be617630b22b854c4f4" title="Accessor for the in_addr part of sockaddr. ">inAddr()</a>, <a class="el" href="classArSocket.html#a34005874b46b174cfff549bcd8f50958" title="Accessor for the port of the sockaddr. ">inPort()</a> </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="aa11d9c51e510e4b7bfc35103bc3b4114"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::hostAddr </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct in_addr &amp;&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a hostname string to an address structure. </p>
<dl class="section return"><dt>Returns</dt><dd>false on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a11b42725ca91a9d95cbe85f56feba58e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the OS sockets system, if neccesary. </p>
<p>In Windows, the networking subsystem needs to be initialized and shutdown individyaly by each program.</p>
<p>So when a program starts they will need to call the static function <a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e" title="Initialize the OS sockets system, if neccesary. ">ArSocket::init()</a> and call <a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc" title="Shutdown the OS sockets system, if neccesary. ">ArSocket::shutdown()</a> when it exits. For programs that use <a class="el" href="classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73" title="Initialize Aria global data struture and perform OS-specific initialization, including adding OS sign...">Aria::init()</a> and <a class="el" href="classAria.html#a5970d7ac6a16b99b0e08d4cbedd78724" title="Performs OS-specific deinitialization, used by shutdown() and exit(). ">Aria::uninit()</a> calling the <a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e" title="Initialize the OS sockets system, if neccesary. ">ArSocket::init()</a> and <a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc" title="Shutdown the OS sockets system, if neccesary. ">ArSocket::shutdown()</a> is unnecessary. The <a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> initialization functions take care of this. These functions do nothing in Linux.</p>
<dl class="section return"><dt>Returns</dt><dd>false failure. </dd></dl>

</div>
</div>
<a class="anchor" id="a7a9bd59b92bd1018c8be0af39eac2dc8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::open </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Type&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>openOnIP</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open a server port. </p>
<p>Opens a server port, that is, a port that is bound to a local port (and optionally, address) and listens for new incoming connections. Use <a class="el" href="classArSocket.html#a6647efb8d20f9523dad090a68b1e4e2c" title="Accept a new connection. ">accept()</a> to wait for a new incoming connection from a client.</p>
<p>In additon, internally this method calls setLinger(0), <a class="el" href="classArSocket.html#a87e6aaf36163f42cac218333ecc078b7" title="Set the reuse address value. ">setReuseAddress()</a>, and <a class="el" href="classArSocket.html#a657700645f097c3b53c2f5bb8c97cb7e" title="Set socket to nonblocking. Most importantly, calls to read() will return immediately, even if no data is available. ">setNonBlock()</a> to turn on these options (having these on is particularly useful for servers).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>Port number </td></tr>
    <tr><td class="paramname">type</td><td>ArSocket::TCP or ArSocket::UDP. </td></tr>
    <tr><td class="paramname">openOnIP</td><td>If given, only bind to the interface accociated with this address (Linux only) (by default, all interfaces are used)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketServerExample_8cpp-example.html#a2">socketServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a6cf324be0075d3469a70d01d4740e23c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>msWait</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read data from the socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buff</td><td>buffer to read into </td></tr>
    <tr><td class="paramname">len</td><td>how many bytes to read </td></tr>
    <tr><td class="paramname">msWait</td><td>if 0, don't block, if &gt; 0 wait this long for data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes read </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketClientExample_8cpp-example.html#a7">socketClientExample.cpp</a>, and <a class="el" href="socketServerExample_8cpp-example.html#a11">socketServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a7a6449d5b385d44e26af4250eaf7658c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * ArSocket::readString </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>msWait</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads a string from the socket. </p>
<dl class="section note"><dt>Note</dt><dd>This function can only read strings less than 512 characters long as it reads the characters into its own internal buffer (to compensate for some of the things the DOS telnet does).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msWait</td><td>if 0, don't block, if &gt; 0 wait this long for data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data read, or an empty string (first character will be '\0') if no data was read. If there was an error reading from the socket, NULL is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="a5b1623bf035093715ab90af1677ce2f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::recvFrom </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sockaddr_in *&#160;</td>
          <td class="paramname"><em>sin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Receive a message (short string) from the socket. </p>
<p>Normally, <a class="el" href="classArSocket.html#a6cf324be0075d3469a70d01d4740e23c" title="Read data from the socket. ">read()</a> should be used instead. This is a wrapper around the recvfrom() system call. </p>

</div>
</div>
<a class="anchor" id="aad4e9284aa39028d770a6fef0ebb62a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::sendTo </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a message (short string) on the socket. </p>
<p>Normally, <a class="el" href="classArSocket.html#af2cfbd564eec7020283f5a6fe41f558f" title="Write data to the socket. ">write()</a> should be used instead. This is a wrapper around the sendto() system call. </p>

</div>
</div>
<a class="anchor" id="a7aa35f485bbdbacfe599617366d761ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::sendTo </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_in *&#160;</td>
          <td class="paramname"><em>sin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a message (short string) on the socket. </p>
<p>Normally, <a class="el" href="classArSocket.html#af2cfbd564eec7020283f5a6fe41f558f" title="Write data to the socket. ">write()</a> should be used instead. This is a wrapper around the sendto() system call. </p>

</div>
</div>
<a class="anchor" id="a946caf0804f5d91682d816d0995c84c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::setBroadcast </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set broadcast value. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure.</dd>
<dd>
false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="aee3f81f6d774f883b1ff46fe9d89d02f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::setLinger </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the linger value. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure.</dd>
<dd>
false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a5c435287e6e2f778874dcc15c6aa4e27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::setNoDelay </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>flag</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets NODELAY option on TCP socket, which can reduce latency for small packet sizes. </p>
<p>If this socket is a TCP socket, then set the TCP_NODELAY flag to 1, to disable the use of the Nagle algorithm (which waits until enough data is ready to send to fill a TCP frame, rather then sending the packet immediately).</p>
<p>If this socket is a TCP socket, then set the TCP_NODELAY flag, to disable the use of the Nagle algorithm (which waits until enough data is ready to send to fill a TCP frame, rather then sending the packet immediately).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flag</td><td>true to turn on NoDelay, false to turn it off. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true of the flag was successfully set, false if there was an error or this socket is not a TCP socket.</dd>
<dd>
true of the flag was successfully set, false if there was an error or this socket is not a TCP socket. </dd></dl>

</div>
</div>
<a class="anchor" id="a657700645f097c3b53c2f5bb8c97cb7e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::setNonBlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set socket to nonblocking. Most importantly, calls to <a class="el" href="classArSocket.html#a6cf324be0075d3469a70d01d4740e23c" title="Read data from the socket. ">read()</a> will return immediately, even if no data is available. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure.</dd>
<dd>
false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="a87e6aaf36163f42cac218333ecc078b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSocket::setReuseAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the reuse address value. </p>
<dl class="section return"><dt>Returns</dt><dd>false and set error code and description string on failure.</dd>
<dd>
false and set error code and description string on failure </dd></dl>

</div>
</div>
<a class="anchor" id="aec8534984137fb13a4f1e94c2b3839dc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ArSocket::shutdown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Shutdown the OS sockets system, if neccesary. </p>
<p>In Windows, the networking subsystem needs to be initialized and shutdown individyaly by each program.</p>
<p>So when a program starts they will need to call the static function <a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e" title="Initialize the OS sockets system, if neccesary. ">ArSocket::init()</a> and call <a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc" title="Shutdown the OS sockets system, if neccesary. ">ArSocket::shutdown()</a> when it exits. For programs that use <a class="el" href="classAria.html#ad99c16b5d947229d9f8e1c5b2d4cdd73" title="Initialize Aria global data struture and perform OS-specific initialization, including adding OS sign...">Aria::init()</a> and <a class="el" href="classAria.html#a5970d7ac6a16b99b0e08d4cbedd78724" title="Performs OS-specific deinitialization, used by shutdown() and exit(). ">Aria::uninit()</a> calling the <a class="el" href="classArSocket.html#a11b42725ca91a9d95cbe85f56feba58e" title="Initialize the OS sockets system, if neccesary. ">ArSocket::init()</a> and <a class="el" href="classArSocket.html#aec8534984137fb13a4f1e94c2b3839dc" title="Shutdown the OS sockets system, if neccesary. ">ArSocket::shutdown()</a> is unnecessary. The <a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> initialization functions take care of this. These functions do nothing in Linux. </p>

</div>
</div>
<a class="anchor" id="aa92f0db004d5642efb4298e4fcad2738"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ArSocket::transfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transfer ownership of a socket. </p>
<p><a class="el" href="classArSocket.html#aa92f0db004d5642efb4298e4fcad2738" title="Transfer ownership of a socket. ">transfer()</a> will transfer ownership to this socket. The input socket will no longer close the file descriptor when it is destructed. </p>

</div>
</div>
<a class="anchor" id="af2cfbd564eec7020283f5a6fe41f558f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write data to the socket. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buff</td><td>buffer to write from </td></tr>
    <tr><td class="paramname">len</td><td>how many bytes to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes written </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="socketClientExample_8cpp-example.html#a9">socketClientExample.cpp</a>, and <a class="el" href="socketServerExample_8cpp-example.html#a10">socketServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a62c1a96eb8fa0dd1c384646228eac194"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ArSocket::writeString </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes a string to the socket (adding end of line characters) </p>
<p><b>Java and Python Wrappers:</b> Not available in Java or Python wrapper libraries. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArSocket.html#a69ca55d1e3007e2743c53b038bbe62a7" title="Same as writeString(), but no varargs. ">writeStringPlain()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="netServerExample_8cpp-example.html#a1">netServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArSocket.h</li>
<li>ArSocket.cpp</li>
<li>ArSocket_LIN.cpp</li>
<li>ArSocket_WIN.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArSocket.html">ArSocket</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
